home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-09-05 | 3.7 KB | 112 lines | [TEXT/GEOL] |
- Item 8887896 5-Sept-89 05:27
-
- From: D2769 Comusearch, James Benson,PRT
-
- To: MID France, M.I.D.
-
- cc: MACAPP.TECH$ MACAPP Tech
-
- Sub: Modified MABuild
-
- Fellow MacAppers,
-
- In our work here, we needed to keep a demo and a commercial version of our
- application. The -d option in mabuild is perfect for that since it will define
- the flag in all the compilers (C, Pascal & Rez). But we wanted to keep both
- versions of the application around so we wouldn't have to recompile the whole
- thing each time we switched from one to the other.
-
- I added the following two options to MaBuild:
-
- -UserVersion VersionName # Keep objects in folder :.VersionName Files:
- -DefineVersion VersionName # Same as -d VersionName -UserVersion VersionName
-
- Only one small problem remains: You must have a copy of MacApp in a folder
- named :.VersionName Files: within the Libraries folder, since it will look for
- the same subfolder as it uses for the Application. You can use the "mabuild
- -UserVersion Demo -autobuild" to create it.
-
- I put together this message by taking code out of MABuild.p directly, so the
- code shown here is correct. But, I might have left out something, so if
- anybody has any problems with these changes, please let me know. I could
- compress the copy of the MABuild.p and link it tomorrow.
-
- One more thing: To compile it: "mabuild -NODEBUG mabuild." Make sure you use
- NoDEBUG. See note in the TMPWTool.
-
- Here are the changes required to the source code of MABuild.
-
- Define these constants.
- kwUserVersion = 86;
- kwDefineVersion = 87;
-
- Add these fields to the TMABuildTool object:
- fUserVersion: Boolean;
- fFolderName: TStringHandle;
-
- Add to the ShowUsage method:
- PutHelp(' -UserVersion VersionName # Keep objects in folder
- :.VersionName Files:');
- PutHelp(' -DefineVersion VersionName # Same as -d VersionName
- -UserVersion VersionName');
-
- This is where the actual work gets done. Add these to the DoProcessOptionArg
- method:
- kwUserVersion:
- BEGIN
- fUserVersion := True;
- fFolderName.Catenate(GetNextArg);
- fFolderName.Catenate(' Files');
- END;
-
- kwDefineVersion:
- BEGIN
- fUserVersion := True;
- fFolderName.Free;
- fFolderName := NewTStringHandle;
-
- theNextArg := GetNextArg;
-
- fFolderName.Catenate(theNextArg);
- fFolderName.Catenate(' Files');
-
- fAsmOptions.Catenate(' -d ');
- fAsmOptions.Catenate(theNextArg);
-
- fCOptions.Catenate(' -d ');
- fCOptions.Catenate(theNextArg);
-
- fCPlusOptions.Catenate(' -d ');
- fCPlusOptions.Catenate(theNextArg);
-
- fMakeOptions.Catenate(' -d ');
- fMakeOptions.Catenate(theNextArg);
-
- fPascalOptions.Catenate(' -d ');
- fPascalOptions.Catenate(theNextArg);
- fPascalOptions.Catenate('=TRUE');
-
- fRezOptions.Catenate(' -d ');
- fRezOptions.Catenate(theNextArg);
-
- END;
-
-
- Add to the IMABuildTool method:
- fFolderName := NewTStringHandle;
- fUserVersion := FALSE;
-
- Add to the InstallKeywords method:
- InstallKeyWord('UserVersion', kwUserVersion);
- InstallKeyWord('DefineVersion', kwDefineVersion);
-
- And, the last IF-THEN in the DoToolAction method should look like this:
- IF fUserVersion Then
- XSeparateObjectsFolder := fFolderName.AsStr255
- ELSE IF NOT fRenameFlagsPairs.ValueAt(fOptionFlags.AsStr255,
- XSeparateObjectsFolder) THEN
- XSeparateObjectsFolder := fOptionFlags.AsStr255;
-
-
-
-